import request from '@/utils/request'

export const listTDisease = (search) =>
    request({
        url: '/tDisease',
        method: 'get',
        params: {
            offset: search.offset,
            limit: search.limit,
            name: search.name
        }
    })
    export const queryAllTDisease = () =>
    request({
        url: '/tDisease/queryAllTDisease1',
        method: 'get'
    })
//查询所有的分类t_clinic_department
  export const listTClinciDepartment = () =>
    request({
        url: '/tClinicDepartment',
        method: 'get'
    })

  export const getTDiseaseById = (id) =>
    request({
      url: '/tDisease/' + id,
      method: 'get'
    })
export const queryDiseaseByMember = (id) =>
    request({
      url: '/tDisease/queryDiseaseByMember/' + id,
      method: 'get'
    })

  export const saveTDisease = (evaluate) =>
    request({
      url: '/tDisease',
      method: 'post',
      data: evaluate
    })
export const updateTDisease = (id, evaluate) =>
    request({
      url: '/tDisease/' + id,
      method: 'put',
      data: evaluate
    })

export const removeTDisease = (id) =>
  request({
      url: '/tDisease/' + id,
      method: 'delete'
  })
  export const updateDiseaseById = (id,myDiseaseHas,dearDiseaseHas) =>
  request({
      url: '/tDisease/updateDiseaseById/' + id,
      method: 'post',
      data:{myDiseaseHas:myDiseaseHas,dearDiseaseHas:dearDiseaseHas}

  })
  export const addDiseaseById = (idcard,myDiseaseHas,dearDiseaseHas) =>
  request({
      url: '/tDisease/addDiseaseById/' + idcard,
      method: 'post',
      data:{myDiseaseHas:myDiseaseHas,dearDiseaseHas:dearDiseaseHas}

  })

